package com.qiguliuxing.dts.db.service;

import com.alibaba.druid.util.StringUtils;
import com.github.pagehelper.PageHelper;
import com.qiguliuxing.dts.db.dao.DtsLivestreamMapper;
import com.qiguliuxing.dts.db.dao.DtsRoleMapper;
import com.qiguliuxing.dts.db.domain.DtsLivestream;
import com.qiguliuxing.dts.db.domain.DtsLivestreamExample;
import com.qiguliuxing.dts.db.domain.DtsRole;
import com.qiguliuxing.dts.db.domain.DtsRoleExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Service
public class DtsLiveStreamService {
	@Resource
	private DtsLivestreamMapper dtsLivestreamMapper;

	public DtsLivestream findById(Integer id) {
		return dtsLivestreamMapper.selectByPrimaryKey(id);
	}

	public void add(DtsLivestream role) {
		dtsLivestreamMapper.insertSelective(role);
	}

	public void updateById(DtsLivestream role) {
		dtsLivestreamMapper.updateByPrimaryKeySelective(role);
	}

	public List<DtsLivestream> queryAll() {
		DtsLivestreamExample example = new DtsLivestreamExample();
		return dtsLivestreamMapper.selectByExample(example);
	}
}
